
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
		<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="treelist">
		
		{volist name="menuinfo" id="v1"}
			{if condition="$v1.show == 1"}
			{if condition="$v1.pid == 0"}
			
			{empty name="$v1.url"}
			  <li class="layui-nav-item"><a class="site-demo-active" data-type="tabAdd" data-id="{$v1.id}" data-title="{$v1.title}" data-url="{:url('admin/index/datagrid?id='.$v1.id, '', '')}" >{$v1.title}</a></li>
			
			{else/}
			  <li class="layui-nav-item"><a class="site-demo-active" data-type="tabAdd" data-id="{$v1.id}" data-title="{$v1.title}" data-url="{:url('admin/index/'.$v1.url, '', '')}" >{$v1.title}</a></li>
			
			{/empty}
			
			{elseif condition="$v1.pid == -1" /}
			<li class="layui-nav-item">
			  <a  href="javascript:;">{$v1.title}</a>
			  <dl class="layui-nav-child">
			{volist name="menuinfo" id="v2"}
					{if condition="$v2.pid == $v1.id"}
						{empty name="$v2.url"}
						<dd><a class="site-demo-active" data-type="tabAdd" data-id="{$v2.id}" data-title="{$v2.title}" data-url="{:url('admin/index/datagrid?id='.$v2.id, '', '')}" >{$v2.title}</a></dd>
						
						{else/}
						<dd><a class="site-demo-active" data-type="tabAdd" data-id="{$v2.id}" data-title="{$v2.title}" data-url="{:url('admin/index/'.$v2.url, '', '')}" >{$v2.title}</a></dd>
						
						{/empty}
					
					{/if}
			{/volist}
			  </dl>
			</li>
			
			{/if}
			{/if}
		{/volist}
       
        

      </ul>
	  
	  <script>
	  
		/*var a=location.href.split('/');
		var len=a.length;
		var a1 = $('.layui-nav-item a').each(
			function(){
			var href=$(this).attr('href').split('/');
			var len1=href.length;
			
				if(href[len1-1]==a[len-1])
				{
					$(this).parent().parent().parent().addClass('layui-nav-itemed');
					$(this).parent().addClass('layui-nav-itemed');
				}
			}
	   )*/
	  </script>
    </div>
  </div>
 